import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/HomeOFKgm.vue'
import LoginPage from '../views/login/LoginPage.vue'
// import HomeMiddle from '../views/KgmHomePage/HomeMiddle.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'LoginPage',
    component: LoginPage
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children: [
      // {
      //   path: '',
      //   redirect: HomeMiddle
      // },
      // {
      //   path: 'PlayListDetail',
      //   component: () => import('../views/KgmHomePage/PlaylistDetail/PlayListDetail.vue')
      // }
    ]
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
